#include "lib_MonitorCpu.h"
#include <cstdio>
#include <unistd.h>

int main()
{
    MonitorCpu monitor_cpu;
    sysCpuTime_t* sysCpuTime_ptr = nullptr;
    int count = 10;
    while (count--)
    {
        sleep(1);
        sysCpuTime_ptr = monitor_cpu.updae_cpu_time();
        if(sysCpuTime_ptr == nullptr)
        {
            printf("getSysCpuTime error\n");
            continue;
        }
        monitor_cpu.show_cpu_usage(sysCpuTime_ptr);
    }
}